<!DOCTYPE HTML>
<html>

<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="//cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="//cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap-grid.min.css">
    <link href="./static/toastr.min.css" rel="stylesheet" />
    <script src="./static/toastr.min.js"></script>
    <script type="text/javascript" src="./static/main.js"></script>
    <title>我的资产</title>
</head>

<body>
    <div class="container-fluid">
        <div class="row">
            <div class="col-8" style="">
                <div class="row">
                    <div class="col-6">
                        <h2>资产：</h2>
                    </div>
                    <div class="col-6 text-right">
                        <h2 id="dayid">第 0 天</h2>
                    </div>
                </div>
                <div class="row">
                    <div class="col-4">总资产：<span id="assa">0</span></div>
                    <div class="col-4">现金：<span id="cash">0</span></div>
                    <div class="col-4">面包：<span id="bread">0</span></div>
                </div>
                <div class="row">
                    <div class="col-4"><button type="button" class="btn btn-primary btn-block"
                            onclick="domet(0)">买flag</button></div>
                    <div class="col-4"><button type="button" class="btn btn-primary btn-block"
                            onclick="domet(1)">买面包</button></div>
                    <div class="col-4"><button type="button" class="btn btn-primary btn-block"
                            onclick="domet(2)">睡觉</button></div>
                </div>
                <div class="row">
                    <div class="col-2">
                        <div class="btn-group-vertical">
                            <button type="button" class="btn btn-primary" id="tobank-0"
                                onclick="renderbank(0)">银行A</button>
                            <button type="button" class="btn btn-primary" id="tobank-1"
                                onclick="renderbank(1)">银行B</button>
                            <button type="button" class="btn btn-primary" id="tobank-2"
                                onclick="renderbank(2)">银行C</button>
                        </div>
                    </div>
                    <div class="col-10">
                        <div class="row">
                            <div class="col-4">余额：<span id="brem">0</span></div>
                            <div class="col-4">欠款：<span id="blo">0</span></div>
                            <div class="col-4">总可用额度：<span id="bam">0</span></div>
                        </div>
                        <div class="row">
                            <div class="col-6">
                                <div class="row">
                                    <div class="col-12 text-center">
                                        <h4>存款</h4>
                                    </div>
                                </div>
                                <div class="row">
                                    <label>金额：</label>
                                    <input class="form-control col-4" id="amount-0" value="0" type="number" />
                                    <div class="col-4">可用：<span id="avail-0">0</span></div>
                                </div>
                                <div class="row align-items-center">
                                    <div class="col-8">
                                        <input type="range" class="form-control-range" min="0" max="1" step="0.00001"
                                            id="scol-0" value="0" />
                                    </div>
                                    <div class="col-4">
                                        <button type="button" class="btn btn-primary btn-block"
                                            id="setmax-0">最大</button>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-12">
                                        <button type="button" class="btn btn-primary btn-block"
                                            id="button-0">存款</button>
                                    </div>
                                </div>
                            </div>
                            <div class="col-6">
                                <div class="row">
                                    <div class="col-12 text-center">
                                        <h4>取款</h4>
                                    </div>
                                </div>
                                <div class="row">
                                    <label>金额：</label>
                                    <input class="form-control col-4" id="amount-1" value="0" type="number" />
                                    <div class="col-4">可用：<span id="avail-1">0</span></div>
                                </div>
                                <div class="row align-items-center">
                                    <div class="col-8">
                                        <input type="range" class="form-control-range" min="0" max="1" step="0.00001"
                                            id="scol-1" value="0" />
                                    </div>
                                    <div class="col-4">
                                        <button type="button" class="btn btn-primary btn-block"
                                            id="setmax-1">最大</button>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-12">
                                        <button type="button" class="btn btn-primary btn-block"
                                            id="button-1">取款</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-6">
                                <div class="row">
                                    <div class="col-12 text-center">
                                        <h4>借款</h4>
                                    </div>
                                </div>
                                <div class="row">
                                    <label>金额：</label>
                                    <input class="form-control col-4" id="amount-2" value="0" type="number" />
                                    <div class="col-4">可用：<span id="avail-2">0</span></div>
                                </div>
                                <div class="row align-items-center">
                                    <div class="col-8">
                                        <input type="range" class="form-control-range" min="0" max="1" step="0.00001"
                                            id="scol-2" value="0" />
                                    </div>
                                    <div class="col-4">
                                        <button type="button" class="btn btn-primary btn-block"
                                            id="setmax-2">最大</button>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-12">
                                        <button type="button" class="btn btn-primary btn-block"
                                            id="button-2">借款</button>
                                    </div>
                                </div>
                            </div>
                            <div class="col-6">
                                <div class="row">
                                    <div class="col-12 text-center">
                                        <h4>还款</h4>
                                    </div>
                                </div>
                                <div class="row">
                                    <label>金额：</label>
                                    <input class="form-control col-4" id="amount-3" value="0" type="number" />
                                    <div class="col-4">可用：<span id="avail-3">0</span></div>
                                </div>
                                <div class="row align-items-center">
                                    <div class="col-8">
                                        <input type="range" class="form-control-range" min="0" max="1" step="0.00001"
                                            id="scol-3" value="0" />
                                    </div>
                                    <div class="col-4">
                                        <button type="button" class="btn btn-primary btn-block"
                                            id="setmax-3">最大</button>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-12">
                                        <button type="button" class="btn btn-primary btn-block"
                                            id="button-3">还款</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-12">
                        <li>需要消耗1个面包以进入下一天，面包单价为10</li>
                        <li>每日存款利率为2%，借款利息为5%</li>
                        <li>借款额度与最大净资产有关</li>
                        <li>flag单价为999888777，无欠款时才可购买</li>
                    </div>
                </div>
                <div class="tow">
                    <button type="button" class="btn btn-danger" data-toggle="modal" data-target="#myModal">重开</button>
                </div>
            </div>
            <div class="col-4" style="">
                <textarea class="form-control" style="height:100%" readonly id="logger"></textarea>
            </div>
        </div>
        <div class="modal fade" id="myModal">
            <div class="modal-dialog">
              <div class="modal-content">
                <div class="modal-header">
                  <h4 class="modal-title">确定要重开？</h4>
                  <button type="button" class="close" data-dismiss="modal">&times;</button>
                </div>
                <div class="modal-body">
                    所有数据将重置
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-danger" data-dismiss="modal" onclick="doreset()">确定</button>
                  <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                </div>
           
              </div>
            </div>
          </div>
    </div>
</body>

</html>